package com.jaydenxiao.common.update;

import android.Manifest;
import android.app.Activity;
import android.util.Log;

import com.yanzhenjie.permission.Action;
import com.yanzhenjie.permission.AndPermission;

import java.util.List;

public class UpdateChecker {

/*

    public static void checkForDialog(final Activity context) {
        AndPermission.with(context).runtime()
                .permission(Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE)
                .onGranted(new Action<List<String>>() {
                    @Override
                    public void onAction(List<String> data) {
                        if (context != null) {
                            new CheckUpdateTask(context, Constants.TYPE_DIALOG, true).execute();
                        } else {
                            Log.e(Constants.TAG, "The arg context is null");
                        }
                    }
                }).onDenied(new Action<List<String>>() {
            @Override
            public void onAction(List<String> data) {
            }
        }).start();
    }


    public static void checkForNotification(Activity context) {
        if (context != null) {
            new CheckUpdateTask(context, Constants.TYPE_NOTIFICATION, false).execute();
        } else {
            Log.e(Constants.TAG, "The arg context is null");
        }

    }
*/


}
